﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace PlantsVsZombies
{
    public abstract class Character : VisibleGameEntity
    {
        protected Boolean _visible = true;


        public bool Visible
        {
            get { return _visible; }
            set
            {
                _visible = value;
                for (int i = 0; i < NSprites; i++)
                    Sprites[i].Visible = _visible;
            }
        }

        public override void Draw(SpriteBatch spriteBatch)
        {
            if(Visible)
                base.Draw(spriteBatch);
        }
    }
}
